<script lang="text/javascript">
$(document).ready(function(){
	$('.btGoToPage').click(function(){
		window.location = '{$_link}' + $(this).parent().find('.txGoToPage').val();
		//TODO: verificar se vai dar conflito ao ter mais de uma listview na mesma tela
	});
	$('.txGoToPage').keyup(function(e) {
		//alert(e.keyCode);
		if(e.keyCode == 13) {
			window.location = '{$_link}' + $(this).val();
			//TODO: verificar se vai dar conflito ao ter mais de uma listview na mesma tela
		}
	});
});
</script>
<table class="tbList ui-corner-bottom" cellspacing="0">
	{if $_strTitle}<caption class="ui-corner-top">{$_strTitle}</caption>{/if}
	<thead>
		<tr>
			{foreach $_arrHeaders as $_strHeader}
				<th width="{$_strHeader.width}" class="align{$_strHeader.align|capitalize}">{$_strHeader.label}</th>
			{/foreach}
			<th class="tbAction"></th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td class="spaceLeft alignCenter">Total <b>{$_intTotal}</b></td>
			<td align="center">
				<ul>
					<li class="{if $_intSelectedPage - 1 >= 1}ui-state-error-text{else}ui-state-disabled{/if} ui-corner-all">
						<a href="{$_link}1" title="First Page" class="ui-icon ui-icon-arrowthickstop-1-w"></a>
					</li>
					<li class="{if $_intSelectedPage - 1 >= 1}ui-state-error-text{else}ui-state-disabled{/if} ui-corner-all">
						<a href="{$_link}{if !$_intSelectedPage}1{elseif $_intSelectedPage - 1 >= 1}{$_intSelectedPage - 1}{else}{$_intSelectedPage}{/if}" title="Previous Page" class="ui-icon ui-icon-triangle-1-w"></a>
					</li>
					<li class="{if $_intSelectedPage + 1 <= $_intPages}ui-state-error-text{else}ui-state-disabled{/if} ui-corner-all">
						<a href="{$_link}{if !$_intSelectedPage}2{elseif $_intSelectedPage + 1 <= $_intPages}{$_intSelectedPage + 1}{else}{$_intSelectedPage}{/if}" title="Next Page" class="ui-icon ui-icon-triangle-1-e"></a>
					</li>
					<li class="{if $_intSelectedPage + 1 <= $_intPages}ui-state-error-text{else}ui-state-disabled{/if} ui-corner-all">
						<a href="{$_link}{$_intPages}" title="Last Page" class="ui-icon ui-icon-arrowthickstop-1-e"></a>
					</li>
				</ul>
			</td>
			<td class="alignRight spaceRight">{$_btGoToPage}<span class="spaceLeft"></span>{$_txGoToPage}</td>
		</tr>
	</tfoot>
	<tbody>
		{foreach $_arrContent as $_k => $_content}
		<tr class="line{$_k%2}">
			<td class="alignCenter"><b>{$_content.id_user}</b></td>
			<td>{$_content.tx_username}</td>
			<td class="tbAction alignRight spaceRight">
				{foreach $_arrActionButtons as $_type => $_button}
				<a href="{$_button.link}{$_content.id_user}" title="{$_button.hint}"><span class="ui-icon {$_button.css}"></span></a>
				{/foreach}
			</td>
		</tr>
	{/foreach}
	</tbody>
</table>